{extend name="public:base" /}

{block name="css"}
<style>
  .census span {
    display: block;
    font-size: 16px;
    font-weight: bold;
    float: left;
    margin-left: 60px;
  }
</style>
{/block}

{block name="content"}
<div class="wrapper wrapper-content animated fadeInRight">
    <div class="row">
        <div class="col-lg-12">
            <div class="ibox ">
                <div class="ibox-content">

                    <div class="row">
                        <div class="col-sm-6 m-b-sm census">
<!--                            <span class="all_video_count" style="margin-left: 0">视频：20</span>-->
                            <span class="error_video" style="margin-left: 0">视频异常：{$error_video_count}</span>
<!--                            <span class="all_music_count">音频：20</span>-->
                            <span class="error_music">音频异常：{$error_music_count}</span>
                        </div>
                    </div>

                    <div class="row search-form">
                        <div class="col-sm-2 m-b-sm">
                            <div class="input-group">
                                <input placeholder="请选择开始时间" value="{:input('start_time')}" type="text" name="start_time" class="form-control form-control-lg screen-date" readonly="" lay-key="1">
                            </div>
                        </div>

                        <div class="col-sm-2 m-b-sm">
                            <div class="input-group">
                                <input placeholder="请选择结束时间" value="{:input('end_time')}" type="text" name="end_time" class="form-control form-control-lg screen-date" readonly="" lay-key="1">
                            </div>
                        </div>

                        <div class="col-sm-2 m-b-sm">
                            <div class="input-group">
                                <select class="form-control form-control-lg" name="terminal">
                                    <option value="0">请选择终端</option>
                                    <option value="1" {:input('terminal') == 1 ? 'selected' : ''}>网页端</option>
                                    <option value="2" {:input('terminal') == 2 ? 'selected' : ''}>app端</option>
                                </select>
                            </div>
                            <div class="hr-line-dashed"></div>
                        </div>

                        <div class="col-sm-2 m-b-sm">
                            <div class="input-group">
                                <select class="form-control form-control-lg" name="style">
                                    <option value="0">请选择处理状态</option>
                                    <option value="1" {:input('style') == 1 ? 'selected' : ''}>已查看</option>
                                    <option value="2" {:input('style') == 2 ? 'selected' : ''}>已处理</option>
                                    <option value="3" {:input('style') == 3 ? 'selected' : ''}>暂不处理</option>
                                </select>
                            </div>
                            <div class="hr-line-dashed"></div>
                        </div>

                        <div class="col-sm-2 m-b-sm">
                            <div class="input-group">
                                <button type="button" class="btn btn-primary btn-lg screen-btn">搜索</button>
                            </div>
                        </div>
                    </div>


                    <div class="table-responsive">
                        <table class="table table-striped">
                            <thead>
                            <tr>
                                <th width="15%">本次监测时间</th>
                                <th width="15%">名称</th>
                                <th width="10%">url</th>
                                <th width="6%">访问状态</th>
                                <th width="8%">持续时间</th>
                                <th width="9%">所属栏目</th>
                                <th width="5%">类型</th>
                                <th width="5%">终端</th>
                                <th width="7%">处理状态</th>
                                <th width="20%">操作</th>
                            </tr>
                            </thead>
                            <tbody>
                            {volist name="list" id="vo"}
                            <tr>
                                <td>{$vo.check_time|timeFormat}</td>
                                <td>{$vo.title}</td>
                                <td><a href="{$vo.url}" target="_blank">{$vo.url} </a></td>
                                {if $vo.status == 0}
                                <td style="color: red">异常</td>
                                {else /}
                                <td style="color: green">正常</td>
                                {/if}
                                <td>{$vo.status == 0 ? errorKeepTime(3, $vo.live_id, $vo.id, $vo.check_time) : ''}</td>
                                <td>{$vo.type_name}</td>
                                <td>{$vo.type == 1 ? '视频' : '音频'}</td>
                                <td>{$vo.terminal == 1 ? '网页端' : 'app端'}</td>
                                <td>{$vo.style_desc}</td>
                                <td class="project-actions">
                                    {if $vo.status == 0}
                                    <a href="{:url('liveDetail', ['id' => $vo.id])}" class="btn btn-white btn-sm" style="color: red"><i class="iconfont icon-edit"></i> 处理 </a>
                                    {/if}
                                    <a href="{:url('delLive', ['id' => $vo.live_id])}" class="btn btn-white btn-sm ajax-del"><i class="iconfont icon-trash"></i> 删除音视频
                                    </a>
                                    <a href="{:url('checkLiveLogResultList', ['live_id' => $vo.live_id])}" class="btn btn-white btn-sm"><i class="iconfont icon-list"></i> 查看历史记录 </a>
                                </td>
                            </tr>
                            {/volist}
                            </tbody>
                        </table>
                        {if !empty($list)}{$list->render()}{/if}
                    </div>

                </div>
            </div>
        </div>

    </div>
</div>

{/block}

{block name="js"}
<script src="/static/laydate/laydate.js"></script>
<script>
    laydate.render({
        elem: '.screen-date' //指定元素
    });
</script>

{/block}

